package com.itheima.demo;

public class Method9 {
    public static void main(String[] args) {
        int[] arr = {11, 55, 33, 22, 44};
        int max = getMax(arr);
        System.out.println(max);
    }
    public static int getMax(int[]arr){
        int max=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (max<arr[i]){
                max=arr[i];
            }
        }
        return max;
    }
}
